package com.probox.common.core.enums;

public enum CouponRuleEnum {
    Get("Get","领取"),
    VIP("VIP","VIP会员"),
    Register("Register","新用户注册"),
    Operate("Operate","运营发放"),
    rule("rule","优惠券规则"),
    upLevel("upLevel","会员升级"),
    SignIn("SignIn","签到"),
    buy("buy","购买"),
    exchange("exchange","兑换码兑换"),
    Prize("Prize","中奖赠送");

    private CouponRuleEnum(String k, String v) {
        this.setKey(k);
        this.setValue(v);
    }

    public static String getNameByKey(String key) {
        String rst = "";
        for(CouponRuleEnum oe: CouponRuleEnum.values()) {
            if (oe.getKey().equals(key)) {
                rst = oe.getValue();
                break;
            }
        }
        return rst;
    }

    private String key;
    private String value;

    public String getKey() {
        return key;
    }
    public void setKey(String key) {
        this.key = key;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }

}
